<?xml version="1.0" encoding="UTF-8"?>
<!--
    Document   : Page2
    Created on : 08-Jul-2009, 13:35:22
    Author     : newtonr6
-->
<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ice="http://www.icesoft.com/icefaces/component" xmlns:jsp="http://java.sun.com/JSP/Page">
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view>
        <html id="outputHtml1">
            <head id="outputHead1">
                <ice:outputStyle href="./resources/stylesheet.css" id="outputStyle1"/>
                <ice:outputStyle href="./xmlhttp/css/xp/xp.css" id="outputStyle2"/>

            </head>
            <body id="outputBody1" style="-rave-layout: grid">
                <ice:portlet>
                    <ice:form id="form1">
                        <ice:panelGrid cellpadding="4" >
                            <ice:outputText id="outputText1" style="font-weight:bold; font-size:16px; color:#191970; text-align:center" value="#{workflowBean.workflow}"/>
                            <ice:graphicImage id="wfImage" value="#{workflowBean.thumb}" rendered="#{Page2.compsVis}" />
                            <ice:dataTable binding="#{Page2.inputsTable}" id="inputsTable" value="#{workflowDetails.inputs}" var="item" columnWidths="150px" rendered="#{Page2.compsVis}">
                                <ice:column>
                                    <f:facet name="header">
                                        <ice:outputText value="Input Name" />
                                    </f:facet>
                                    <ice:outputText id="outputText2" style="color:red; font-size:12px; font-weight:bold; text-align:center" value="#{item.name}" binding="#{Page2.inputName}"/>
                                    <ice:outputText binding="#{Page2.outputText3}" style="color:gray; text-align:center"/>
                                    <ice:outputText binding="#{Page2.listValues}" rendered="false" />
                                    <ice:outputText binding="#{Page2.uicType}" rendered="false" />
                                </ice:column>
                                <ice:column>
                                    <f:facet name="header">
                                        <ice:outputText value="UI Component" />
                                    </f:facet>
                                    <ice:selectOneListbox styleClass="error" partialSubmit="true"  valueChangeListener="#{Page2.uic_changed}" binding="#{Page2.uicMenu}">
                                        <f:selectItem itemLabel="Checkbox" itemValue="checkbox" />
                                        <f:selectItem itemLabel="Dropdown Menu" itemValue="dropdown" />
                                        <f:selectItem itemLabel="File" itemValue="file" />
                                        <f:selectItem itemLabel="Radio Button" itemValue="radio" />
                                        <f:selectItem itemLabel="Text Area" itemValue="textarea" />
                                        <f:selectItem itemLabel="Text Field" itemValue="inputtext" />
                                    </ice:selectOneListbox>
                                </ice:column>
                                <ice:column rendered="#{Page2.valuesVis}" style="align:top">
                                    <f:facet name="header">
                                        <ice:outputText binding="#{Page2.valuesHeader}" />
                                    </f:facet>
                                    <ice:panelGrid columns="2">
                                        <ice:inputText binding="#{Page2.valuesInput}" />
                                        <ice:commandButton value="Add value" actionListener="#{Page2.add_list_value}" />
                                        
                                    </ice:panelGrid>
                                    <ice:commandButton value="Submit values"/>
                                </ice:column>
                                <ice:column rendered="#{!Page2.valuesVis}">
                                    <f:facet name="header">
                                        <ice:outputText value="Type Constraint" />
                                    </f:facet>
                                    <ice:selectOneListbox styleClass="error" >
                                        <f:selectItem itemLabel="String" itemValue="1" />
                                        <f:selectItem itemLabel="Integer" itemValue="2" />
                                        <f:selectItem itemLabel="File" itemValue="3" />
                                        <f:selectItem itemLabel="Complex" itemValue="4" />
                                    </ice:selectOneListbox>
                                </ice:column>
                                <ice:column rendered="#{!Page2.valuesVis}">
                                    <f:facet name="header">
                                        <ice:outputText value="Default Value" />
                                    </f:facet>
                                    <ice:inputText binding="#{Page2.inputText}" id="inputText"/>
                                </ice:column>
                                <ice:column>
                                    <f:facet name="header">
                                        <ice:outputText value="Description/Example" />
                                    </f:facet>
                                    <ice:inputTextarea id="inputTextarea" binding="#{Page2.inputTextarea}" />
                                </ice:column>
                                <ice:column  rendered="#{Page2.addVis}">
                                    <ice:commandButton value="Add" actionListener="#{Page2.button_action}" />
                                </ice:column>
                            </ice:dataTable>
                            <ice:outputText rendered="#{Page2.submitVis}" style="font-style:italic;" value="You must now press the 'Submit' button for the workflow's inputs to be commmitted to the database" />
                            <ice:commandButton value="Submit" action="#{Page2.submit}" rendered="#{Page2.submitVis}" />
                        </ice:panelGrid>
                    </ice:form>
                </ice:portlet>
            </body>
        </html>
    </f:view>
</jsp:root>
